<?php
namespace App\Controllers\Home\Page;
use \App\Libs\Home\Home;
use \App\Libs\Helper\WeixinHelper as Weixin;
use \App\Models\Home\User;

class Info extends  \App\Libs\Base\BaseTwigAction 
{
    protected function beforeRun() {
        parent::beforeRun();
        //$this->needLogin = TRUE;
    }
	
	public function execute(){
		/*$openid = $this->request->get('openid');
		$key = '';
		if (isset($_COOKIE[SESSION_KEY_OPEN]) && ! empty($_COOKIE[SESSION_KEY_OPEN])) {
            $key = trim($_COOKIE[SESSION_KEY_OPEN]);
		}
		if( empty($key) && !\App\Libs\Cache\Redis::get(trim($key)) ){
			header('Location:/home/select.html');
		}
		else{
			$openid =	\App\Libs\Cache\Redis::get(trim($key));
		}
		$user = User::find(array(
			' openid = :openid: and is_user != 0',
			'bind'=>array( 'openid'=>$openid )
		));
		if( !empty( $user ) ){
			$this->addParam('is_user',$user->is_user);
		}else{
			header('Location:/home/select.html');
		}*/
		
		return parent::execute();
	}

}
